package com.example.demo.Controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LogController {
//    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    @RequestMapping("/log")
    public String logger(){
        log.trace("这是一段trace日志");
        log.debug("这是一段debug日志");
        log.info("这是一段info日志");
        log.warn("这是一段warn日志");
        log.error("这是一段error日志");
        return "打印日志";
    }
}
